import type { App } from 'vue';
// import 'ant-design-vue/dist/reset.css';
import { AButton } from '@/components/basic/button';
import { ADialog } from '@/components/basic/dialog';
import { vLoading } from 'element-plus';
import 'element-plus/dist/index.css';
import Lazyload from 'vue-lazyload';
import ErrorImg from '@/assets/error.jpeg';

export function setupElem(app: App<Element>) {
  Object.entries({ AButton, ADialog }).forEach(([key, component]) => app.component(key, component));
  app.directive('loading', vLoading);
  app.use(Lazyload, { preLoad: 1, error: ErrorImg, attempt: 1 });
}
